package com.bidepan.autoInstall.Service;

import com.bidepan.autoInstall.Dao.UserDao;
import com.bidepan.autoInstall.Dao.UserDaoImpl;

public class UserServiceImpl implements UserService{
    public void setUserDao(UserDao userDao) {
        this.userDao1 = userDao;
    }

    private UserDao userDao1;

    @Override
    public void addUserService() {
        System.out.println("UserService接口里面的方法执行了");
        //普通写法
//        UserDao userDao = new UserDaoImpl();
//        userDao.addUserDao();

        //bean.xml自动注入写法
        userDao1.addUserDao();
    }
}
